package com.example.edu_cms.controller;

import com.example.commonutils.R;
import com.example.edu_cms.entity.CrmBanner;
import com.example.edu_cms.service.CrmBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author LUOXIN
 * @create 2021-09-13 21:23
 */

@RestController
@RequestMapping("/edu_cms/crm_banner/front")
public class CrmBannerFrontController {

    @Autowired
    private CrmBannerService bannerService;

    //查询所有banner

    @GetMapping("getAllBanner")
    public R getAllBanner() {
        List<CrmBanner> list = bannerService.selectAllBanner();
        return R.ok().data("list",list);
    }
}
